<template>
  <div class="cart">
    <nav-bar class="nav-bar">
      <template #center>购物车({{cartLength}})</template>
    </nav-bar>
    <cart-list></cart-list>
    <cart-bottom-bar/>
  </div>
</template>

<script>
import NavBar from 'components/common/navbar/NavBar.vue'
import {mapGetters} from 'vuex'
import CartList from './childComps/CartList.vue'
import CartBottomBar from './childComps/CartBottomBar.vue'
export default {
  components: {
    NavBar,
    CartList,
    CartBottomBar,
  },
  name: 'Cart',
  computed:{
    ...mapGetters(['cartLength','cartList'])
  }
}
</script>

<style scoped>
  .cart {
    height: 100vh;
  }

  .nav-bar {
    background-color: var(--color-tint);
    color: #fff;
  }
</style>
